function addRoleInfo()
{
	 location.href=base+"/roleManager/toRegRole.do";
}


 function queryRoleForm(pageIndex,pageSize)
  {
          var url =base+"/roleManager/pagingRoleList.do?pageIndex="+pageIndex+"&pageSize="+pageSize;
          var params =jQuery("#queryForm").serialize();
          params=decodeURIComponent(params,true); 
          jQuery("#userRoleContent").load(url+"&"+ encodeURI(encodeURI(params)));
  }

  function toEidtRole(roleId)
  {
          location.href=base+"/roleManager/toEditRole.do?roleId="+roleId;
  }


  function deleteRole(roleId)
  {
        if(window.confirm("确定要删除该角色吗?"))
        { 
               jQuery.post(
                      base+"/roleManager/deleteRole.do?roleId="+roleId, 
                      function(result){
                         var data = eval("("+result+")");
                         if(data.STATUS==0)
                         {
                         	alert("删除成功!");
                         	queryRoleForm(1,15);
                            return ;
                         }
                         alert(data.MSG);  
              });   
        }
  }

  jQuery(function()
      { 
              queryRoleForm(1,15);
      } 
  	);